fix(extended_chat): keep real tool errors and recover chat lookup by id - #1134
Open
3316891527 wants to merge 2 commits into
Open
fix(extended_chat): keep real tool errors and recover chat lookup by id#11343316891527 wants to merge 2 commits into
3316891527 wants to merge 2 commits into
Conversation
Stop treating send timeouts as success, keep native error text, require one bound role per chat, and fail if chat service cannot start.
If find_chat only trusts the in-memory chat list, a valid UUID can still fail with Chat not found. Fall back to DAO-backed existence checks and accept current as the active window.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明 / Description
背景与动机 / Context and motivation
extended_chat对宿主聊天 API 的错误处理和会话查找不够准确:超时可能被当成成功,失败文案被统一改写,按 id 查找时可能错过实际存在的会话。改动范围 / Changes
chat_with_agent不再用Promise.race把发送超时写成成功,只等待原生timeout_ms。catch吞掉;按名称精确匹配,否则大小写不敏感匹配。startService失败会让chat_with_agent失败,不再忽略。chat_id时要求该会话已绑定角色,并按角色 id 或名称校验一角色一会话。read_messages_range的工具描述标明行号包含库内 summary 等隐藏行。find_chat/ 按标题解析会话 /chat_with_agent校验已有会话时:先走宿主findChat;query 为对话 id 仍找不到则用list_chats和agent_status再确认;支持current解析为当前会话。不同步修改宿主
findChat、工作流或其它插件。兼容性与风险 / Compatibility and risks
chat_with_agent超时从成功变为失败。chat_with_agent。startService失败会阻断发信。关联 Issue / Related issue
N/A。内置
extended_chat插件修复。验证方式 / Verification
证据 / Evidence
2 commits, 3 files (
examples/extended_chat.ts,examples/extended_chat.js,app/src/main/assets/packages/extended_chat.js).